Optimal. Leaf size=113 \[ \frac{\sqrt{\pi } a^2 \text{Erf}(a+b x)}{4 b^3}+\frac{\sqrt{\pi } a^2 \text{Erfi}(a+b x)}{4 b^3}+\frac{\sqrt{\pi } \text{Erf}(a+b x)}{8 b^3}-\frac{\sqrt{\pi } \text{Erfi}(a+b x)}{8 b^3}-\frac{a \sinh \left ((a+b x)^2\right )}{b^3}+\frac{(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.100875, antiderivative size = 113, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 9, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.75, Rules used = {5365, 6742, 5299, 2204, 2205, 5321, 2637, 5325, 5298} \[ \frac{\sqrt{\pi } a^2 \text{Erf}(a+b x)}{4 b^3}+\frac{\sqrt{\pi } a^2 \text{Erfi}(a+b x)}{4 b^3}+\frac{\sqrt{\pi } \text{Erf}(a+b x)}{8 b^3}-\frac{\sqrt{\pi } \text{Erfi}(a+b x)}{8 b^3}-\frac{a \sinh \left ((a+b x)^2\right )}{b^3}+\frac{(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5365
Rule 6742
Rule 5299
Rule 2204
Rule 2205
Rule 5321
Rule 2637
Rule 5325
Rule 5298
Rubi steps
\begin{align*} \int x^2 \cosh \left ((a+b x)^2\right ) \, dx &=\frac{\operatorname{Subst}\left (\int (-a+x)^2 \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^3}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2 \cosh \left (x^2\right )-2 a x \cosh \left (x^2\right )+x^2 \cosh \left (x^2\right )\right ) \, dx,x,a+b x\right )}{b^3}\\ &=\frac{\operatorname{Subst}\left (\int x^2 \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^3}-\frac{(2 a) \operatorname{Subst}\left (\int x \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^3}+\frac{a^2 \operatorname{Subst}\left (\int \cosh \left (x^2\right ) \, dx,x,a+b x\right )}{b^3}\\ &=\frac{(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3}-\frac{\operatorname{Subst}\left (\int \sinh \left (x^2\right ) \, dx,x,a+b x\right )}{2 b^3}-\frac{a \operatorname{Subst}\left (\int \cosh (x) \, dx,x,(a+b x)^2\right )}{b^3}+\frac{a^2 \operatorname{Subst}\left (\int e^{-x^2} \, dx,x,a+b x\right )}{2 b^3}+\frac{a^2 \operatorname{Subst}\left (\int e^{x^2} \, dx,x,a+b x\right )}{2 b^3}\\ &=\frac{a^2 \sqrt{\pi } \text{erf}(a+b x)}{4 b^3}+\frac{a^2 \sqrt{\pi } \text{erfi}(a+b x)}{4 b^3}-\frac{a \sinh \left ((a+b x)^2\right )}{b^3}+\frac{(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3}+\frac{\operatorname{Subst}\left (\int e^{-x^2} \, dx,x,a+b x\right )}{4 b^3}-\frac{\operatorname{Subst}\left (\int e^{x^2} \, dx,x,a+b x\right )}{4 b^3}\\ &=\frac{\sqrt{\pi } \text{erf}(a+b x)}{8 b^3}+\frac{a^2 \sqrt{\pi } \text{erf}(a+b x)}{4 b^3}-\frac{\sqrt{\pi } \text{erfi}(a+b x)}{8 b^3}+\frac{a^2 \sqrt{\pi } \text{erfi}(a+b x)}{4 b^3}-\frac{a \sinh \left ((a+b x)^2\right )}{b^3}+\frac{(a+b x) \sinh \left ((a+b x)^2\right )}{2 b^3}\\ \end{align*}
Mathematica [A] time = 0.124094, size = 62, normalized size = 0.55 \[ \frac{\sqrt{\pi } \left (2 a^2+1\right ) \text{Erf}(a+b x)+\sqrt{\pi } \left (2 a^2-1\right ) \text{Erfi}(a+b x)-4 (a-b x) \sinh \left ((a+b x)^2\right )}{8 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.045, size = 136, normalized size = 1.2 \begin{align*} -{\frac{x{{\rm e}^{- \left ( bx+a \right ) ^{2}}}}{4\,{b}^{2}}}+{\frac{a{{\rm e}^{- \left ( bx+a \right ) ^{2}}}}{4\,{b}^{3}}}+{\frac{{a}^{2}{\it Erf} \left ( bx+a \right ) \sqrt{\pi }}{4\,{b}^{3}}}+{\frac{{\it Erf} \left ( bx+a \right ) \sqrt{\pi }}{8\,{b}^{3}}}+{\frac{x{{\rm e}^{ \left ( bx+a \right ) ^{2}}}}{4\,{b}^{2}}}-{\frac{a{{\rm e}^{ \left ( bx+a \right ) ^{2}}}}{4\,{b}^{3}}}-{\frac{{\frac{i}{4}}{a}^{2}\sqrt{\pi }{\it Erf} \left ( ibx+ia \right ) }{{b}^{3}}}+{\frac{{\frac{i}{8}}\sqrt{\pi }{\it Erf} \left ( ibx+ia \right ) }{{b}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.61732, size = 1195, normalized size = 10.58 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.85993, size = 382, normalized size = 3.38 \begin{align*} \frac{{\left (\sqrt{\pi }{\left (2 \, a^{2} + 1\right )} \sqrt{b^{2}} \operatorname{erf}\left (\frac{\sqrt{b^{2}}{\left (b x + a\right )}}{b}\right ) e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} + \sqrt{\pi }{\left (2 \, a^{2} - 1\right )} \sqrt{b^{2}} \operatorname{erfi}\left (\frac{\sqrt{b^{2}}{\left (b x + a\right )}}{b}\right ) e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} - 2 \, b^{2} x + 2 \, a b + 2 \,{\left (b^{2} x - a b\right )} e^{\left (2 \, b^{2} x^{2} + 4 \, a b x + 2 \, a^{2}\right )}\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{8 \, b^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \cosh{\left (a^{2} + 2 a b x + b^{2} x^{2} \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] time = 1.31815, size = 185, normalized size = 1.64 \begin{align*} -\frac{\frac{i \, \sqrt{\pi }{\left (2 \, a^{2} - 1\right )} \operatorname{erf}\left (i \, b{\left (x + \frac{a}{b}\right )}\right )}{b} - \frac{2 \,{\left (b{\left (x + \frac{a}{b}\right )} - 2 \, a\right )} e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}}{b}}{8 \, b^{2}} - \frac{\frac{\sqrt{\pi }{\left (2 \, a^{2} + 1\right )} \operatorname{erf}\left (-b{\left (x + \frac{a}{b}\right )}\right )}{b} + \frac{2 \,{\left (b{\left (x + \frac{a}{b}\right )} - 2 \, a\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{8 \, b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]